<?php
$action = @$_GET['action'];
$slug = @$_GET['slug'];
if (!empty($action) || !empty($slug)) {
    ?>
    <div id="breadCrumb">
        <?php
        $space = 18;
        $lastCrumb = array_pop($this->crumbs);
        echo "<ul>";

        echo "<span class='grayr'></span><strong class='greenl' style='left: -18px;'></strong>";
        $i = 1;
        foreach ($this->crumbs as $crumb) {
            echo "<li class='green' style='left: -" . ($space * $i) . "px;'>";
            if (isset($crumb['url']) && !@$isLastCrumb) {
                echo CHtml::link(Yii::t('text', trim(my_ucfirst(lowestring($crumb['name'])))), $crumb['url']);
            } else {
                echo trim(my_ucfirst(lowestring($crumb['name'])));
            }

            echo "</li>";
            echo "<span class='greenr' style='left: -" . ($space * $i) . "px;'></span>";
            if ($i == sizeof($this->crumbs)) {
                echo "<strong class='claretl' style='left: -" . ($space * ($i + 1)) . "px;'></strong>";
            } else {
                echo "<strong class='greenl' style='left: -" . ($space * ($i + 1)) . "px;'></strong>";
            }
            $i++;
        }

        echo "<li class='claret' style='left: -" . ($space * $i) . "px;'>" . trim(display(my_ucfirst(lowestring($lastCrumb['name'])), 100, 100)) . "</li>";
        echo "<span class='claretr' style='left: -" . ($space * $i) . "px;'></span>";
        echo "</ul>";
        ?>             
    </div>
    <?php
}?>